import { request } from '@/utils'

export function updateUser(user) {
  return request({
    url: '/user/updateUser',
    method: 'POST',
    data: JSON.stringify(user),
    headers: {
      'Content-type': 'application/json;charset=utf-8',
    },
  })
}

export function updateUserPassword(username, password) {
  return request({
    url: '/user/updateUserPassword',
    method: 'POST',
    params: {
      username,
      password,
    },
  })
}

export function getUser() {
  return request({
    url: '/user/',
    method: 'GET',
  })
}
